package com.pwt.repository;

import com.pwt.entity.WhatLineMachine;
import com.pwt.repository.base.BaseRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * ProductLineMachine Repository层
 *
 * @author auto generated
 * @date 2021-09-03 11:13:59
 */
public interface WhatLineMachineRepository extends BaseRepository<WhatLineMachine, String> {

    @Query(nativeQuery = true,value = "delete from what_line_machine where what_line_id = ?1")
    @Modifying
    int deleteByWhatLineId(String whatLineId);

    @Query(nativeQuery = true,value = "select * from what_line_machine where what_line_id =?1")
    List<WhatLineMachine>  findAllByWhatLineId(String whatLineId);
}
